package com.csd.action.project;

import java.util.List;

import com.csd.helper.ActionResult;
import com.csd.pojo.CostRecord;
import com.csd.serviceImpl.CostRecordService;
/**
 * 
 * 查询项目花费记录Action
 * @author 尹华彬
 * @version 1.0
 * 
 * <br> 修订时间：2009-12-17
 * <br> 修改原因：创建文件
 * <br> 修改人：尹华彬
 * 
 * <br> 
 * 
 */

public class CostInfoShowAction {
	//项目ID
    private Integer projectID;
    
    //返回页
    private String returnpage;
    
    public String getReturnpage() {
		return returnpage;
	}

	public void setReturnpage(String returnpage) {
		this.returnpage = returnpage;
	}

	//项目的花费记录
    private List<CostRecord> costRecords = null;
    private CostRecordService costRecordService;
	public CostRecordService getCostRecordService() {
		return costRecordService;
	}

	public void setCostRecordService(CostRecordService costRecordService) {
		this.costRecordService = costRecordService;
	}

	public List<CostRecord> getCostRecords() {
		return costRecords;
	}

	public void setCostRecords(List<CostRecord> costRecords) {
		this.costRecords = costRecords;
	}

	public Integer getProjectID() {
		return projectID;
	}

	public void setProjectID(Integer projectID) {
		this.projectID = projectID;
	}
	
	/**
	 * 老师对项目的结题申请的结果
	 * @return String
	 */
    public String execute(){
    	String result = ActionResult.fail;
    	
    	//查看开支信息
    	costRecords = costRecordService.listCostRecord(projectID);
    	if(costRecords != null)
    	{
    		result = ActionResult.success;
    	}
    	
    	return result;
    }
}
